import React from 'react';
import ReactDOM from 'react-dom/client';
import './index.css';
import App from './App';

// 引入 路由  
import { BrowserRouter as Router } from 'react-router-dom'
// 导入antd 的全局css 文件
import 'antd/dist/reset.css';

// 导入仓库 store 
// import store from '@/store'
import { Provider } from 'react-redux'


import { PersistGate } from 'redux-persist/lib/integration/react';

import { persistor, store } from '@/store';

const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
  <Provider store={store}>
    {/* // 配置全局的路由模式 */}
    <PersistGate loading={null} persistor={persistor}>
      <Router>
        <App />
      </Router>
    </PersistGate>
  </Provider>
);

